package com.applink.sell_proof;

import android.content.Context;
import android.os.Bundle;
import android.widget.CompoundButton;

import com.applink.sell_proof.fragment.adapter.BaseFragmentPagerAdapter;
import com.applink.sell_proof.fragment.adapter.LifeFragmentPagerAdapter;

public class LifeStyleActivity extends BasePagerActivity {

	private Context mContext;
	protected BaseFragmentPagerAdapter mFragmentAdapter;

	@Override
	protected void onCreate(Bundle saveInstanceState) {

		super.onCreate(saveInstanceState);
		//setContentView(R.layout.events);
		mContext = this;
		initView();
	}

	/**
	 * initialize all the reference to view objects
	 */
	protected void initView() {

	}

	@Override
	protected BaseFragmentPagerAdapter getFragmentPagerAdapter() {
		if (mFragmentAdapter == null) {
			mFragmentAdapter = new LifeFragmentPagerAdapter(
					getSupportFragmentManager());
		}
		return mFragmentAdapter;
	}

	@Override
	protected int getDefaultPagerIndex() {
		return 0;
	}

	@Override
	public void setSelectedTab() {
		((CompoundButton) findViewById(R.id.announce_tab)).setChecked(true);
		
	}

	@Override
	public int getActivityIndex() {
		return BasePagerActivity.LIFE_ACTIVITY;
	}

//	@Override
//	public boolean onCreateOptionsMenu(Menu menu) {
//		MenuInflater inflater = new MenuInflater(this);
//		inflater.inflate(R.menu.announce_menu, menu);
//		return true;
//	}
//
//	@Override
//	public boolean onOptionsItemSelected(MenuItem item) {
//		switch (item.getItemId()) {
//
//		case R.id.menu_promotion: {
//			Intent intent = new Intent(mContext, NewPromotionActivity.class);
//
//			mContext.startActivity(intent);
//			break;
//		}
//		case R.id.menu_event: {
//			Intent intent = new Intent(mContext, LifeStyleActivity.class);
//
//			mContext.startActivity(intent);
//			break;
//		}
//		default:
//			break;
//		}
//		return false;
//	}
}
